import { Router } from 'express';
import * as Controller from '../api/controllers/department.controller';

const router = Router();

router
  .route('/')
  .get(
    Controller.getDepartments
  );

router
  .route('/:id')
  .get(
    Controller.getDepartmentById
  );

router
  .route('/')
  .post(
    Controller.addDepartment
  );

router
  .route('/:id')
  .put(
    Controller.updateDepartmentById
  );

router
  .route('/:id')
  .delete(
    Controller.deleteDepartmentById
  );

export default router;